package commons.test;

import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.List;

import network.io.OutputStreamFactory;

public class DummyOutputStreamFactory implements
		OutputStreamFactory<Socket, ObjectOutputStream> {

	private List<ObjectOutputStream>	streamToRespond;

	@Override
	public ObjectOutputStream createOutputStream(final Socket source) {
		return streamToRespond.remove(0);
	}

	public void setStreamsToRespond(
			final List<ObjectOutputStream> streamToRespond) {
		this.streamToRespond = streamToRespond;
	}
}
